package com.potevio.simulator.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 心跳报文 0x58
 */
@Component
public class HeartBeatMsg0x58 {
    // 版本域
    public static String versionDomain;

    // 序列号域
    public static String serialNumberDomain;

    // 命令代码
    public static String commandCode;

    // 用户ID
    public static String userId;

    // 指令序号
    public static String instructionsNumber;

    // 心跳应答
    public static String heartbeatRes;

    @Value("${message.heartbeat.version-domain}")
    public void setVersionDomain(String versionDomain) {
        HeartBeatMsg0x58.versionDomain = versionDomain;
    }

    @Value("${message.heartbeat.serial-number-domain}")
    public void setSerialNumberDomain(String serialNumberDomain) {
        HeartBeatMsg0x58.serialNumberDomain = serialNumberDomain;
    }

    @Value("${message.heartbeat.command-code}")
    public void setCommandCode(String commandCode) {
        HeartBeatMsg0x58.commandCode = commandCode;
    }

    @Value("${message.heartbeat.user-id}")
    public void setUserId(String userId) {
        HeartBeatMsg0x58.userId = userId;
    }

    @Value("${message.heartbeat.instructions-number}")
    public void setInstructionsNumber(String instructionsNumber) {
        HeartBeatMsg0x58.instructionsNumber = instructionsNumber;
    }

    @Value("${message.heartbeat.heartbeat-res}")
    public void setHeartbeatRes(String heartbeatRes) {
        HeartBeatMsg0x58.heartbeatRes = heartbeatRes;
    }

}
